import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm'
import * as puppeteer from "puppeteer"

@Entity({name: "bili_video"})
export class BiliVideoEntity {
  @PrimaryGeneratedColumn()
  id: number

  @Column('varchar', {unique: true})
  bvid: string

  @Column('varchar', {nullable: true})
  mid: string
  
  @Column('text', {nullable: true})
  json: string

  @Column('text', {nullable: true})
  video_path: string

  @Column('int', {default: 0})
  status: number

  @CreateDateColumn({type: 'datetime'})
  createAt: Date

  @UpdateDateColumn({type: 'datetime'})
  updateAt: Date
}